package com.csthink;

import com.csthink.mr.wordcount.WordCountDriver;
import org.apache.hadoop.util.ProgramDriver;

/**
 * @author <a href="mailto:csthink@icloud.com">Mars</a>
 * @since 2024-04-17 16:22
 */
public class ExampleDriver {
    public static void main(String[] args) {
        int exitCode = -1;
        ProgramDriver pgd = new ProgramDriver();

        try {
            pgd.addClass("wordcount", WordCountDriver.class,
                    "A map/reduce program that counts the words in the input files.");
            exitCode = pgd.run(args);
        } catch (Throwable e) {
            e.printStackTrace();
        }

        System.exit(exitCode);
    }
}
